<!DOCTYPE html>
<html>
<head>
    <title>奇妙云箱云端管理系统v1.2.2</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- jQuery -->
    <script src="/lib/jq/jquery-2.1.1.min.js" type="text/javascript"></script>
    <!-- bootstrap -->
    <link href="/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <script src="/lib/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/lib/bootstrap-paginator/bootstrap-paginator.min.js" type="text/javascript"></script>
    <!-- twbs-pagination -->
    <script src="/lib/twbs-pagination/jquery.twbsPagination.min.js" type="text/javascript"></script>
    <!-- datetimepicker -->
    <script src="/lib/datetimepicker/js/bootstrap-datetimepicker.min.js" charset="UTF-8"
            type="text/javascript"></script>
    <script src="/lib/datetimepicker/js/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"
            type="text/javascript"></script>
    <link href="/lib/datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
    <!-- -->
    <link href="/lib/font-awesome/css/font-awesome.min.css" rel="stylesheet" media="screen">
    <!-- cloudbox -->
    <link href="/css/layout.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="page-header">
    <div class="media">
        <div class="media-left">
            <a href="/box_management">
                <img class="media-object logo" src="/images/logo.jpeg" alt="logo">
            </a>
        </div>
        <div class="media-body">
            <h3 class="title">奇妙云箱云端管理系统
                <small>v1.2.2</small>
            </h3>
            <div class="user">
                <span class="info">尊敬的用户 <%=session.user.user%> ，您好。</span>
                <a href="/user/update_pwd" class="btn btn-primary btn-sm">
                    <span class=" icon-pencil icon-large"></span>
                    <span>修改密码</span>
                </a>
                <a class="operation btn btn-danger btn-sm" href="/logout">
                    <span class=" icon-signout icon-large"></span>
                    <span>退出</span>
                </a>
            </div>
        </div>
    </div>
</div>
<div class="container-fluid">
    <div class="row">
        <div class="col-md-2">
            <div class="panel-group" id="accordion1" role="tablist" aria-multiselectable="true">
                <% if(session.permissionMap[1]){ %>
                <div class="panel panel-primary cloudbox">
                    <div class="panel-heading" role="tab">
                        <div class="panel-title">
                            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"
                               aria-expanded="true" aria-controls="collapseOne">
                                <span class="icon glyphicon glyphicon-cloud"></span>
                                <span class="title">奇妙云箱</span>
                            </a>
                        </div>
                    </div>
                    <div id="collapseOne" class="panel-collapse collapse in" role="tablepanel"
                         aria-labelledby="headingOne">
                        <div class="list-group">
                            <% if(session.permissionMap[100]){ %>
                            <a href="/box/list?num=1" class="list-group-item">箱子管理</a>
                            <% } %>
                            <% if(session.permissionMap[101]){ %>
                            <a href='/device/list?num=1&&sim=ok' class="list-group-item">设备管理</a>
                            <% } %>
                            <!--<a href='/fault/list' class="list-group-item">故障管理</a>-->
                            <!--<a href='/billing/list' class="list-group-item">计费管理</a>-->
                            <% if(session.permissionMap[103]){ %>
                            <!--<a href="/prize/list?num=1" class="list-group-item">奖品管理</a>-->
                            <% } %>
                            <% if(session.permissionMap[104]){ %>
                            <a href="/material/list?num=1" class="list-group-item">移动内容管理</a>
                            <% } %>
                            <% if(session.permissionMap[105]){ %>
                            <a href='/tvad/list' class="list-group-item">广告内容管理</a>
                            <% } %>
                        </div>
                    </div>
                </div>
                <% } %>
                <% if(session.permissionMap[2]){ %>
                <div class="panel panel-primary">
                    <div class="panel-heading" role="tab">
                        <div class="panel-title">
                            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo"
                               aria-expanded="true" aria-controls="collapseTwo">
                                <span class="icon glyphicon glyphicon-cog"></span>
                                <span class="title">系统中心</span>
                            </a>
                        </div>
                    </div>
                    <div id="collapseTwo" class="panel-collapse collapse in" role="tablepanel"
                         aria-labelledby="headingTwo">
                        <div class="list-group">
                            <% if(session.permissionMap[200]){ %>
                            <a href="/user/list?num=1" class="list-group-item">用户管理</a>
                            <% } %>
                            <% if(session.permissionMap[202]){ %>
                            <a href="/user/role/list?num=1" class="list-group-item">角色管理</a>
                            <% } %>
                            <% if(session.permissionMap[2010]){ %>
                            <a href="/system/box_log?num=1" class="list-group-item">开箱日志</a>
                            <% } %>
                            <% if(session.permissionMap[2011]){ %>
                            <a href="/system/operation_log?num=1" class="list-group-item">操作记录</a>
                            <% } %>
                        </div>
                    </div>
                </div>
                <% } %>
                <% if(session.permissionMap[3]){ %>
                <div class="panel panel-primary ">
                    <div class="panel-heading" role="tab">
                        <div class="panel-title">
                            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree"
                               aria-expanded="true" aria-controls="collapseThree">
                                <span class="icon-gift icon-large"></span>
                                <span class="title">一元中奖</span>
                            </a>
                        </div>
                    </div>
                    <div id="collapseThree" class="panel-collapse collapse in" role="tablepanel"
                         aria-labelledby="headingThree">
                        <div class="list-group">
                            <% if(session.permissionMap[300]){ %>
                            <a href="/goods/list" class="list-group-item">商品管理</a>
                            <% } %>
                            <% if(session.permissionMap[301]){ %>
                            <a href="/activity/list" class="list-group-item">活动管理</a>
                            <% } %>
                            <% if(session.permissionMap[302]){ %>
                            <a href="/applyfor/list" class="list-group-item">申请管理</a>
                            <% } %>
                            <% if(session.permissionMap[303]){ %>
                            <a href="/lottery/list?dispatch=true" class="list-group-item">中奖管理</a>
                            <% } %>
                        </div>
                    </div>
                </div>
                <% } %>
                <% if(session.permissionMap[4]){ %>
                <div class="panel panel-primary">
                    <div class="panel-heading" role="tab">
                        <div class="panel-title">
                            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFour"
                               aria-expanded="true" aria-controls="collapseFour">
                                <span class="icon-coffee icon-large"></span>
                                <span class="title">点单服务</span>
                            </a>
                        </div>
                    </div>
                    <div id="collapseFour" class="panel-collapse collapse  in" role="tablepanel"
                         aria-labelledby="headingFour">
                        <div class="list-group">
                            <% if(session.permissionMap[400]){ %>
                            <a href="/cafe/category/list" class="list-group-item">类目管理</a>
                            <% } %>
                            <% if(session.permissionMap[401]){ %>
                            <a href="/cafe/goods/list" class="list-group-item">商品管理</a>
                            <% } %>
                            <% if(session.permissionMap[402]){ %>
                            <a href="/cafe/order/list" class="list-group-item">订单管理</a>
                            <% } %>
                        </div>
                    </div>
                </div>
                <% } %>
            </div>
        </div>
        <div class="col-md-10">
            <%- body %>
        </div>
    </div>
</div>
</body>
</html>